package TestDemo.example.mapper;

import TestDemo.example.pojo.Dept;
import org.apache.ibatis.annotations.*;


import java.util.ArrayList;

@Mapper
public interface DeptMapper {

    @Select("select id, name, create_time createTime, update_time updateTime from dept ORDER BY update_time DESC")
    public ArrayList<Dept> deptArrayList();

    public void deleteById(Integer id);

    public void add(Dept dept);

    public Dept findDeptById(Integer id);

    @Update("update dept set name=#{name} ,update_time=#{updateTime} where id=#{id} ")
    void updateById(Dept dept);

}
